package org.wukongcrm.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 商机表
    */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "business")
public class Business implements Serializable {
    @TableId(value = "business_no", type = IdType.INPUT)
    private Integer businessNo;

    /**
     * 商机状态组id
     */
    @TableField(value = "type_id")
    private Integer typeId;

    /**
     * 销售阶段
     */
    @TableField(value = "status_id")
    private Integer statusId;

    /**
     * 下次联系时间
     */
    @TableField(value = "next_time")
    private Date nextTime;

    /**
     * 客户id
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 首要联系人id
     */
    @TableField(value = "contacts_id")
    private Integer contactsId;

    /**
     * 商机名称
     */
    @TableField(value = "business_name")
    private String businessName;

    /**
     * 商机金额
     */
    @TableField(value = "money")
    private BigDecimal money;

    /**
     * 整单折扣
     */
    @TableField(value = "discount_rate")
    private BigDecimal discountRate;

    /**
     * 产品总金额
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 创建人id
     */
    @TableField(value = "create_user_id")
    private Long createUserId;

    /**
     * 负责人id
     */
    @TableField(value = "owner_user_id")
    private Long ownerUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 1赢单2输单3无效
     */
    @TableField(value = "is_end")
    private Integer isEnd;

    @TableField(value = "status_remark")
    private String statusRemark;

    /**
     * 1正常 3  删除
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 最后跟进时间
     */
    @TableField(value = "last_time")
    private Date lastTime;

    /**
     * 最后一次跟进内容
     */
    @TableField(value = "last_content")
    private String lastContent;

    /**
     * 0 未跟进 1 已跟进
     */
    @TableField(value = "followup")
    private Integer followup;

    /**
     * 预计成交时间
     */
    @TableField(value = "make_deal_time")
    private Date makeDealTime;

    /**
     * 商品总成本金额
     */
    @TableField(value = "product_cost_total")
    private BigDecimal productCostTotal;

    /**
     * 利润
     */
    @TableField(value = "profit")
    private BigDecimal profit;

    /**
     * 产品id
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 整单折扣
     */
    @TableField(value = "all_discount")
    private Double allDiscount;

    /**
     * 总价
     */
    @TableField(value = "total")
    private BigDecimal total;

    private static final long serialVersionUID = 1L;
}